var m_Count = 0;
var m_Pid = 0;
var m_Point = 0;
var m_dom;
var m_obj;
$(function () {

    //加、减
    $(".score_content_add").on("click", function () {
        
        var score_content_sz = parseInt($(this).siblings(".score_content_input").children("input").val());
        if (score_content_sz > 0) {
            $(this).siblings(".score_content_jian").removeClass("score_content_jianhui");
        } else {
            $(this).siblings(".score_content_jian").addClass("score_content_jianhui");
        }
        $(this).siblings(".score_content_input").children("input").val(score_content_sz + 1);
        m_Pid = $(this).siblings(".score_content_input").children("input").attr("ProductId") + ";";
        m_Count = $(this).siblings(".score_content_input").children("input").val() + ";";
       
        m_Point = $(this).siblings(".score_content_input").children("input").attr("jf") + ";";
        var obj = $(this).siblings(".score_content_input").children("input");
        m_obj = $(this).parents("section").next().children("input");
        m_dom = $(this).parents("section").next().find("ul").eq(1).find("div").eq(2).find("div").eq(0).find("ul").eq(1).find("input");
       
        if (SumMoney != undefined) {
            
            SumMoney(2);
        }
        
    });
    $(".score_content_jian").on("click", function () {
        
        var score_content_sz = parseInt($(this).siblings(".score_content_input").children("input").val());
        if (score_content_sz < 2) {
            $(this).addClass("score_content_jianhui");
        } else if (score_content_sz < 3) {
            $(this).addClass("score_content_jianhui");
            $(this).siblings(".score_content_input").children("input").val(score_content_sz - 1);
        } else {
            $(this).siblings(".score_content_input").children("input").val(score_content_sz - 1);
        }
        m_Pid = $(this).siblings(".score_content_input").children("input").attr("ProductId") + ";";
        m_Count = $(this).siblings(".score_content_input").children("input").val() + ";";
        
        m_Point = $(this).siblings(".score_content_input").children("input").attr("jf") + ";";
        if (SumMoney != undefined) {
            SumMoney(1);
        }
        
    });



    $(".score_content_input").each(function () {        
        var mm = parseInt($(this).children("input").val());
        if (mm < 2) {
            $(this).siblings(".score_content_jian").addClass("score_content_jianhui");
        }
        
    });

});

